@extends("web.layouts.main")

@section("content")
    <section id="page-breadcrumb">
        <div class="vertical-center sun">
            <div class="container">
                <div class="row">
                    <div class="action">
                        <div class="col-sm-12">
                            <h4 class="title">“创建文章”</h4>
                            <small>‘故不积跬步，无以至千里；不积细流，无以成江海。’</small>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>
    <!--/#page-breadcrumb-->
    <section id="blog" class="padding-top">
        <div class="container">
            <div class="row">
                <section id="blog" class="padding-top">
                    <div class="container">
                        <div class="row">

                            <div class="col-md-9 col-sm-7">
                                <form action="/posts" method="POST">
                                    {{csrf_field()}}

                                    <div class="form-group">
                                        <label>标题</label>
                                        <input name="title" type="text" class="form-control" placeholder="这里是标题">
                                    </div>
                                    <div class="form-group">
                                        <label>内容</label>
                                        <textarea id="content"  style="height:400px;max-height:500px; resize: none;" name="content" class="form-control" placeholder="这里是内容" ></textarea>
                                    </div>
                                    <button type="submit" class="btn btn-primary">提交</button>
                                </form>
                                <br>
                                @if(count($errors))
                                <div class="alert alert-error" style="background:#ff9999;color: white ">
                                    <a class="close" data-dismiss="alert">×</a>
                                    <strong>Error!</strong>&nbsp;&nbsp;&nbsp;
                                    @foreach($errors->all() as $error)
                                        {{$error}} &nbsp;&nbsp;&nbsp;
                                    @endforeach
                                </div>
                                @endif
                            </div><!-- /.blog-main -->
                            @include("web.layouts.right_nav")
                        </div>
                    </div>
                </section>
            </div>
        </div>
    </section>
    <!--/#blog-->
@endsection